/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tortues;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;

/**
 *
 * @author p0907654
 */
public class TortueBalle extends Tortue {
    
   

    public TortueBalle() {
        super();
        setColor(1);
    }
    
   

    @Override
    public void drawTurtle(Graphics graph) {
        if (graph == null) {
            return;
        }
        
        for (Segment seg : listSegments) {
            seg.drawSegment(graph);
        }

        //Calcule les 3 coins du triangle a partir de
        // la position de la tortue p
        Point p = new Point(x, y);

        graph.setColor(Color.blue);
        graph.fillOval(p.x, p.y, 10, 10);
    }
    
    
}
